#region License
// /* **************************************************************
// * Copyright (C) intex Consulting GmbH - All Rights Reserved    *
// *--------------------------------------------------------------*
// * Unauthorized copying of this file, via any medium is         *
// * strictly prohibited                                          *
// *--------------------------------------------------------------*
// * Proprietary and confidential                                 *
// *--------------------------------------------------------------*
// * Dissasembling/modifications strictly prohibited!             *
// ***************************************************************/
#endregion

using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using ComHlp.enums;

namespace ComHlp.ContentClasses.VirtualControls.Buttons
{
    [SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global")]
    public class ItxButton
    {
        /// <summary> position?!? </summary>
        public char Pos { get; set; }
        
        /// <summary> upper position </summary>
        public int Top { get; set; }

        /// <summary> lower position </summary>
        public int Bottom { get; set; }

        /// <summary> left position </summary>
        public int Left { get; set; }

        /// <summary> right position </summary>
        public int Right { get; set; }

        /// <summary> appereance/form of button </summary>
        public EItxButtonForm Form { get; set; }

        /// <summary> icon </summary>
        public string Icon { get; set; }

        /// <summary> button number - used to control button state (enabled/disabled) </summary>
        public int ButtonNo { get; set; }

        /// <summary> assigned field - the button belongs to 
        /// 1st field if subdefinitions</summary>
        public string AssignedField { get; set; }

        /// <summary> shortcut/function key mapping </summary>
        public ItxFunctionKey ShortCutKey { get; set; }
        
        /// <summary> what we shall do when the button is clicked </summary>
        public EItxButtonAction ActionType { get; set; }

        /// <summary> button background color </summary>
        public ItxColor BgColor { get; set; }

        /// <summary> button foreground color </summary>
        public ItxColor FgColor { get; set; }

        /// <summary> button font </summary>
        public int FontNo { get; set; }

        /// <summary> font size factor </summary>
        public string FontFact { get; set; }

        /// <summary> button text </summary>
        public string Text { get; set; }

        /// <summary> button enabled or not? (decided through message area) </summary>
        public bool Enabled { get; set; } = true;

        
        /// <summary> if it is a macro, we may receive following macro definitions which 
        /// are parsed into this list </summary>
        public readonly List<ItxButtonAction> Actions = new List<ItxButtonAction>();

        public ItxHorizontalAlignment HorizontalContentAlignment { get; private set; }

        public ItxButton(ItxHorizontalAlignment horizontalContentAlignment)
        {
            HorizontalContentAlignment = horizontalContentAlignment;
        }
    }
}